home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MacWorld 1999 January - Disc 2
/
Macworld (1999-01) (Disk 2).dmg
/
Serious Demos
/
Symbolic Composer 4.2
/
Environment
/
System
/
SOLAR
/
Autocatalysis
/
def-soup
< prev
next >
Wrap
Text File
|
1998-10-23
|
998b
|
30 lines
def-soup soup-name patterns catalysts
This enables you to define manually the soup contexts, modify soup definitions or restore a previously created soup.
(def-soup 'soup
'((e f e) (d e f) (a b c) (d e f) (e d f c) (e d f e f c)
(d e e e f f g g) (g g g g g) (f e e) (e d c) (a a a a a a)
(b b b c c) (c c b b))
'((e f d) (c d) (c d e) (c d e) (f d e) (g g g g) (g f f)
(e e e d) (a b) (c c) (b a a)))
The soup elements are stored in property lists.
(get 'soup 'patterns)
--> '((e f e) (d e f) (a b c) (d e f) (e d f c) (e d f e f c)
(d e e e f f g g) (g g g g g) (f e e) (e d c) (a a a a a a)
(b b b c c) (c c b b))
(get 'soup 'catalysts)
--> '((e f d) (c d) (c d e) (c d e) (f d e) (g g g g) (g f f)
(e e e d) (a b) (c c) (b a a))
To modify globally a soup use mapcar.
(def-soup 'soup
(mapcar #'(lambda (x) (symbol-transpose 1 x))
(get 'soup 'patterns))
(mapcar #'(lambda (x) (symbol-transpose 1 x))
(get 'soup 'catalysts)))